-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add periodic reporter #86
Conversation
@bharathkkb - This is probably the best example module for the required template (already includes |
Thanks @apeabody! Will add it there once I have it working. |
@apeabody this is ready for a review. I will add it via TF in a follow up once we have it soaked for a bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bharathkkb LGTM!
owner: 'GoogleCloudPlatform', | ||
repo: 'terraform-google-secure-cicd', | ||
state: 'open', | ||
labels: [periodicLabel] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the future, might want to consider filtering on user.login
and also title
to minimize someone adding the label to a issue and it being returned.
await github.rest.issues.createComment({ | ||
...context.repo, | ||
issue_number: prevIssues[0].number, | ||
body: txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the future, it might be useful to include a warning in the update if multiple issues were returned prevIssues.length > 1
}); | ||
}; | ||
|
||
// updateAndCloseIssue comments on an existing issue and closes it. No-op if no issue exists. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit for the future: this function operates on all matching issues
// updateAndCloseIssue comments on an existing issue and closes it. No-op if no issue exists. | |
// updateAndCloseIssues comments on any existing issues and closes them. No-op if no issue exists. |
No description provided.